<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('home',function(){
  echo 'ok';
});
Route::get('auth/register','Auth\AuthController@getRegister');
Route::post('auth/register','Auth\AuthController@postRegister');
Route::get('auth/login','Auth\AuthController@getLogin');
Route::post('auth/login','Auth\AuthController@postLogin');
Route::get('auth/logout','Auth\AuthController@getLogout');
Route::get('pre','PreController@pre');
Route::get('preid/{id}','PreController@preid');
//jie
Route::get('/','LoadingController@loading');
Route::get('/area/{id}','AreaController@area');
//load
Route::post("user/changeaddr","ChangeaddrController@changeaddr");
Route::get("changeaddr","ChangeaddrController@changeaddr");
Route::post('changeaddr','ChangeaddrController@addPost');
Route::get("changeaddr/del/{uid}","ChangeaddrController@del");
Route::match(["get","post"],"changeaddr/update/{uid}","ChangeaddrController@update");
Route::get("orderhistory","OrderController@orderhistory");
Route::get("orderhistory/del/{id}","OrderController@del");
Route::match(["get","post"],"changepassword","ChangepasswordController@change");


Route::get("home","OrderController@home");

// 鲤鱼。
Route::get('/caiguan/{sid}','CaiguanController@meallist');

Route::get('/shoppingCart','CartController@buy');
Route::get('/order','CartController@order');

Route::get('/arealist','AcsController@getAreaList');
Route::get('/editarea/{aid}','AcsController@getAreaEdit');
Route::post('/editarea/{aid}','AcsController@postAreaEdit');
Route::get('/delarea/{aid}','AcsController@getAreaDel');

Route::get('/shoplist','AcsController@getShopList');
Route::get('/addshop','AcsController@getShopAdd');
Route::post('/addshop','AcsController@postShopAdd');
Route::get('/editshop/{sid}','AcsController@getShopEdit');
Route::post('/editshop/{sid}','AcsController@postShopEdit');
Route::get('/delshop/{sid}','AcsController@getShopDel');

Route::get('/catlist','AcsController@getCatList');
Route::get('/addcat','AcsController@getCatAdd');
Route::post('/addcat','AcsController@postCatAdd');
Route::get('/editcat/{lid}','AcsController@getCatEdit');
Route::post('/editcat/{lid}','AcsController@postCatEdit');
Route::get('/delcat/{sid}','AcsController@getCatDel');

//che
Route::get('grzx','GrowController@getCustomer');

Route::get('wycc','GrowController@postTodayOrder');
Route::post('wycc','GrowController@postTodayOrder');
//ting
Route::get('addpre','AdorderController@getaddpre');
Route::post('addpre','AdorderController@postaddpre');
Route::get('prelist','AdorderController@present');
Route::get('preedit/{id}','AdorderController@preedit');
Route::post('preedit/{id}','AdorderController@postpreedit');
Route::get('predel/{id}','AdorderController@predel');
Route::get('admin','AdorderController@getadmin');
Route::post('admin','AdorderController@postadmin');


//li
Route::get('addcaidan','AddcaidanController@addcaidan');
Route::post('addcaidan','AddcaidanController@addcaidanpost');
Route::get('listcaidan','AddcaidanController@listcaidan');
Route::get('editcaidan/{mid}','AddcaidanController@editcaidan');
Route::post('editcaidan/{mid}','AddcaidanController@editcaidanpost');
Route::get('delcaidan/{mid}','AddcaidanController@delcaidan');
Route::get('houtai','AdorderController@houtai');

